package com.xiaoyu.lanling.feature.checkin.datamodel

import `in`.srain.cube.request.JsonData
import com.xiaoyu.lanling.media.image.ImageLoadParam
import java.io.Serializable

class CheckInSuccessModel(jsonData: JsonData) : Serializable {
    val amount = jsonData.optString("amount")
    val type = jsonData.optString("type")
    val desc = jsonData.optString("desc")
    val imageUrl = jsonData.optString("imageUrl")
    val continuousSignInDays = jsonData.optInt("continuousSignInDays")

    val imageLoadParam
        get() = ImageLoadParam.newBuilder().setUrl(imageUrl).setWidthInDP(176).setHeightInDP(128).build()
}